const webpack = require('webpack')

module.exports = {
  devServer: {
    open: true,  //自动打开
    proxy: {
      "/api": {
        ws: false,
        target: "",  //地址
        changeOrigin: true,
        withCredentials: true,
        pathRewrite: {
          "^/api": "",
        },
      }
    }
  },
  configureWebpack: {
    // 富文本图片处理
    plugins: [
      new webpack.ProvidePlugin({
        'window.Quill': 'quill/dist/quill.js',
        Quill: 'quill/dist/quill.js'
      })
    ]
  },
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/'
};
